package cn.edu.sicnu.cardgame.data

data class PlayerProfile(
    var name: String = "",
    var gender: String = "",
    var studentId: String = "",
    var phone: String = "",
    var email: String = "",
    var hobbies: String = "",
    var avatarUri: String = "",
    var highScore: Int = 0
)

object ProfileRepository {
    val profile: PlayerProfile = PlayerProfile()

    fun update(
        name: String,
        gender: String,
        studentId: String,
        phone: String,
        email: String,
        hobbies: String,
        avatarUri: String
    ) {
        profile.name = name
        profile.gender = gender
        profile.studentId = studentId
        profile.phone = phone
        profile.email = email
        profile.hobbies = hobbies
        profile.avatarUri = avatarUri
    }

    fun tryUpdateHighScore(score: Int) {
        if (score > profile.highScore) profile.highScore = score
    }
}

